package com.jdy.haoduoai.socket;

import com.jdy.haoduoai.enums.MediaType;
import com.jdy.haoduoai.enums.PlayState;

import org.json.JSONObject;


/**
 * Listen to state change during the interaction with xiaoxiaoban.
 * 
 * @author zp @ 2015-7-30 上午10:05:16
 */
public interface DeviceStateListener {

  // login in other device
  public void onRemoteLogin();

  public void onConnectionChanged(boolean connect);

  public void onPowerChanged(int power);

  public void onUpgrade(int updatingStatus);

  // to compatible with old device version less than 2.0.1
  public void onCheckDeviceVersion(String version);

  public void onPlayNextFailed();

  public void onPlayPrevFailed();

  // @Deprecated
  // public void onPlayPause();
  //
  // @Deprecated
  // public void onPlayResume();

  public void onPlayMedia(PlayState playState, MediaType type, JSONObject data);

  // public void onRTMPServerConnection(boolean connected);

  public void onReceivedVoiceMessage(String streamUrl);

}
